﻿<UserControl xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"  x:Class="PicasaManager.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <ScrollViewer>
            <ItemsControl x:Name="itemsList">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <HyperlinkButton Click="OnPictureLoaded" Tag="{Binding}">
                                <Image Width="300"  Source="{Binding Path=Media.LargestThumbnail.Url}"/>
                            </HyperlinkButton>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <my:WrapPanel />
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </ScrollViewer>
        <StackPanel Orientation="Horizontal"  HorizontalAlignment="Left" VerticalAlignment="Top">
            <TextBox Text="raul.andrisan" Width="150" x:Name="txtUserName"  HorizontalAlignment="Left" VerticalAlignment="Top"/>
            <Button Content="Load" Click="OnBack" HorizontalAlignment="Left" VerticalAlignment="Top"/>
        </StackPanel>
    </Grid>
</UserControl>
